{block content}
<div id="block_top_full">
	<div class="block">
		<div class="block_header"><a n:href="myCalendar">Můj kalendář</a></div>
		<div class="block_body">
					  {snippet calendar}
			<table class="calendar">
						  {foreach $calendar as $week}
				<tr>
					<td class="calendar_week">{$week->weekNumber}</td>
							{foreach $week->days as $day}
					<td class="calendar_day{if $day->isWeekend} calendar_free{/if}">
						<div class="calendar_day_name">{$day->date|date:D}</div>
						<div class="calendar_day_date">{$day->date|date:'j.n'}</div>
						<div class="clear"></div>
						<div class="events">
									  {ifset $day->events['projects']}
									  {foreach $day->events['projects'] as $project}
							<div class="event">
								<a n:href=":Project:overview, $project[id]">{$project[name]}</a>
							</div>
									  {/foreach}
									  {/ifset}
									  {ifset $day->events['milestones']}
									  {foreach $day->events['milestones'] as $milestone}
							<div class="event">
								<a n:href=":Project:milestones, $milestone->project[id]">{$milestone[name]}</a>
							</div>
									  {/foreach}
									  {/ifset}
									  {ifset $day->events['tasks']}
									  {foreach $day->events[tasks] as $task}
							<div class="event">
								<div class="event_priority priority{$task->task_priority[priority]}"></div>
								<a n:href=":Task:task, $task[id]">{$task[name]}</a>
							</div>
									  {/foreach}
									  {/ifset}
						</div>
					</td>
							{/foreach}
				</tr>
						  {/foreach}

			</table>
			<div id="calendar_show_next_week"><a href="{link addWeek!}" class="ajax">Zobrazit následující týden</a></div>
					  {/snippet}
		</div>
	</div>
			  {control tasks:myTasks}
</div>
<div id="block_bottom_bg">
	<div id="block_bottom_left">
		<div class="block">
			<div class="block_header"><a n:href="Project:">Mé projekty ({count($myProjects)})</a></div>
			<div class="block_body">
				<div class="block_start"></div>
						  {if count($myProjects) > 0}
				<table class="my_projects">
							  {foreach $myProjects as $project}
					<tr class="my_projects_project_line">
						<td class="my_projects_project">{$project[name]}</td>
						<td class="my_projects_deadline">{if $project[deadline] > 0}{$project[deadline]|date:$dateFormatLong}{/if}</td>
						<td class="my_projects_actions" style="width:110px;text-align:right;">
							<a n:href="Project:overview, $project[id]"><img src="{$basePath}/images/task.gif" alt="U" title="Úkoly"></a>
							<a n:href="Project:milestones, $project[id]"><img src="{$basePath}/images/milestone.png" alt="M" title="Milníky"></a>
							<a n:href="Project:documents, $project[id]"><img src="{$basePath}/images/document.gif" alt="D" title="Dokumenty"></a>
							<a n:href="Project:flowChart, $project[id]"><img src="{$basePath}/images/diagram.gif" alt="D" title="Diagram"></a>
							<a n:href="Project:calendar, $project[id]"><img src="{$basePath}/images/calendar16.gif" alt="K" title="Kalendář"></a>
						</td>
					</tr>
						  {/foreach}
				</table>
						  {else}
				<div class="no_entry">Žádné projekty</div>
						  {/if}
			</div>
		</div>
		  {control tasks:assignedTasks}
		  {control tasks:watchedTasks}
		
	</div>
	<div id="block_bottom_right">
		<div class="block">
			<div class="block_header">Poslední komentáře</div>
			<div class="block_body">
				<div class="block_start"></div>
				<div class="last_comments">
							  {foreach $lastComments as $comment}
					<div class="comment{if $iterator->first} first{/if}">{$comment[date]|date:'j.n. H:m'} - <a n:href="Task:task $comment[task_id]">{$comment->task[name]}</a><div style="float:right;">({$comment->user[name]}&nbsp;{$comment->user[surname]})</div><div class="clear"></div>
							  {/foreach}
				</div>
			</div>
		</div>
	</div>
	<div id="block_bottom_end" class="clear"></div>
</div>
{include #contextMenu}
{/block}


{block head}
<link rel="stylesheet" href="{$basePath}/css/{$colorstyle}/noticeboard.css">
{/block}